package linear_enumeration;

//独立完成
public class basic2006 {

    public int countKDifference(int[] nums, int k) {
        int num=0;
        for (int i = 0; i < nums.length; i++) {
            for (int j = i; j <nums.length; j++) {
                if (Math.abs(nums[i]-nums[j])==k){
                    num++;
                }

            }

        }




return num;
    }


}
